{% extends 'index.html' %}
{% load static %}

{% block posts %}

<article class="post">
{% for result in results %}
	<header>
		<div class="title">
			<h2><a href="{% url 'logs:log' result.id %}">{{ result.description }}</a></h2>
			<p>{% url 'logs:log' result.id %}</p>
		</div>
		<div class="meta">
			<time class="published" datetime="#">{{ result.date_added|date:"d E Y" }}</time>
			<a href="#" class="author"><span class="name">{{ result.owner.get_username }}</span><img src="images/avatar.jpg" alt="" /></a>
		</div>
	</header>
	{% comment %} <a href="single.html" class="image featured"><img src="images/pic02.jpg" alt="" /></a> {% endcomment %}
	<p>{{ result.text|safe|truncatechars_html:100 }}</p>
	<footer>
		<ul class="actions">
			<li><a href="{% url 'logs:log' result.id %}" class="button large">Читать</a></li>
		</ul>
		<ul class="stats">
			<li><a href="#">General</a></li>
			<li><a href="#" class="icon solid fa-heart">28</a></li>
			<li><a href="#" class="icon solid fa-comment">128</a></li>
		</ul>
	</footer>
{% empty %}
	<p><h4>По вашему запросу ничего не найдено :(</h4></p>
{% endfor %}
</article>

{% endblock %}